;
(function($, $ajax, config, window, document, undefined) {
	
	var rightPath = config.zuulPath + config.serviceName.right;
	var commonPath = config.zuulPath + config.serviceName.common;
	var homepagePath = config.zuulPath + config.serviceName.homepage;
	var housemanagePath = config.zuulPath + config.serviceName.housemanage;
	
	var $right = {
		getService : function(sufUrl, data, callback, errorCallback) {
			var pathTemp = rightPath + "/" +  sufUrl;
			$ajax({
				url : pathTemp,
				data : data,
				success : callback,
				error : errorCallback
			});
		}
	}

	var $common = {
		getService : function(sufUrl, data, callback, errorCallback) {
			var pathTemp = commonPath + "/" +  sufUrl;
			$ajax({
				url : pathTemp,
				data : data,
				success : callback,
				error : errorCallback
			});
		}
	}
	
	var $homepage = {
		getService : function(sufUrl, data, callback, errorCallback) {
			var pathTemp = homepagePath + "/" +  sufUrl;
			$ajax({
				url : pathTemp,
				data : data,
				success : callback,
				error : errorCallback
			});
		}
	}

	var $housemanage = {
		getService : function(sufUrl, data, callback, errorCallback) {
			var pathTemp = housemanagePath + "/" +  sufUrl;
			$ajax({
				url : pathTemp,
				data : data,
				success : callback,
				error : errorCallback
			});
		}
	}

	// 最后将插件对象暴露给全局对象
	window.$right = $right;
	window.$common = $common;
	window.$homepage = $homepage;
	window.$housemanage = $housemanage;
	
})(jQuery, $ajax, config, window, document);

